#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Generic;
using Cephei.QL.Termstructures;
using Cephei.QL.Times;
using Cephei.QL;
using Cephei.QL.Instruments;
namespace Cephei.QL.Indexes
{
     // <summary> 
	// ! base class for swap-rate indexes
	// </summary>
    [Guid ("4DC8B91E-363E-4305-B3DF-3F64FAEFF3BA"),ComVisible(true)]
	public interface ISwapIndex : Cephei.QL.Indexes.IInterestRateIndex
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        
		 Cephei.QL.Indexes.ISwapIndex Clone(Cephei.QL.Termstructures.IYieldTermStructure forwarding);
        
		 QL.Times.BusinessDayConventionEnum FixedLegConvention {get;}
        
		 Cephei.QL.Times.IPeriod FixedLegTenor {get;}
        
		 Cephei.QL.Indexes.IIborIndex IborIndex {get;}
        
		 DateTime MaturityDate(DateTime valueDate);
        
		 Cephei.QL.Instruments.IVanillaSwap UnderlyingSwap(DateTime fixingDate);
        
		 Cephei.QL.Termstructures.IYieldTermStructure ForwardingTermStructure {get;}
        
		 Boolean ExogenousDiscount {get;}
    }

    // <summary> 
	// ! base class for swap-rate indexes Factory
	// </summary>
   	[ComVisible(true)]
    public interface ISwapIndex_Factory // : Collection_Factory<ISwapIndex, ICell<ISwapIndex>>
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        /// <summary>
        /// Create a hybrid Vector of ISwapIndex, with event notification of changes
        /// </summary>
        /// <returns>a new Vector&ltISwapIndex&gt</returns>
        IVector<ISwapIndex> CreateVector();
        /// <summary>
        /// Create a hybrid Vector of ICell of ISwapIndex, with event notification of changes
        /// </summary>
        /// <returns>a new ICell&ltIVector&ltI&ltISwapIndex&gt&gt&gt</returns>
        Generic.ICell<IVector<Generic.ICell<ISwapIndex>>> CreateCellVector();
        IVector<ISwapIndex> CreateVector(IEnumerable<ISwapIndex> source);
        Generic.ICell<IVector<Generic.ICell<ISwapIndex>>> CreateCellVector(IEnumerable<Generic.ICell<ISwapIndex>> source);
        
	    ISwapIndex Create (String familyName, Cephei.QL.Times.IPeriod tenor, UInt32 settlementDays, Cephei.QL.ICurrency currency, Cephei.QL.Times.ICalendar calendar, Cephei.QL.Times.IPeriod fixedLegTenor, QL.Times.BusinessDayConventionEnum fixedLegConvention, Cephei.QL.Times.IDayCounter fixedLegDayCounter, Cephei.QL.Indexes.IIborIndex iborIndex);
        
	    ISwapIndex Create (String familyName, Cephei.QL.Times.IPeriod tenor, UInt32 settlementDays, Cephei.QL.ICurrency currency, Cephei.QL.Times.ICalendar calendar, Cephei.QL.Times.IPeriod fixedLegTenor, QL.Times.BusinessDayConventionEnum fixedLegConvention, Cephei.QL.Times.IDayCounter fixedLegDayCounter, Cephei.QL.Indexes.IIborIndex iborIndex, Cephei.QL.Termstructures.IYieldTermStructure discountingTermStructure);
    }
}

